package org.state;

public class Context {
	public final static StateA STATE_A = new StateA();
	public final static StateB STATE_B = new StateB();
	public final static StateC STATE_C = new StateC();
	public final static StateD STATE_D = new StateD();

	private State currentState;

	public State getCurrentState() {
		return currentState;
	}

	public void setCurrentState(State currentState) {
		this.currentState = currentState;
		this.currentState.setContext(this);
	}

	public void MethodA() {
		this.currentState.MethodA();
	}

	public void MethodB() {
		this.currentState.MethodB();
	}

	public void MethodC() {
		this.currentState.MethodC();
	}

	public void MethodD() {
		this.currentState.MethodD();
	}
}
